This application claims benefit of priority of Foreign Patent Application No. 10151919.7, filed in Great Britain on Jan. 28, 2010, which is herein incorporated by reference.
The present invention relates to the management of transaction processing systems, and more particularly to the provision of improved management of commit processing in circumstances where transaction threading may be affected by transactional affinities.
The basic concepts of transaction processing have been known in the art for many years and need no introduction to one of ordinary skill in the art. In particular, the concepts of one-and two-phase commit processing of transactions are well-understood. Similarly, the concept of transactional affinity is well known. “Affinities,” in general, refer to data that the application references in the target server, which needs to be subsequently accessed, thus adding a level of difficulty to the ability to multi-thread work whilst the affinity is active. This is because resource managers in typical transaction processing systems may or may not be threadsafe in the presence of such affinities.
Transaction managers provide the operating environment to allow customer written application programs to operate as atomic transactions and update recoverable resources with integrity. These recoverable resources may be local to the transaction manager and managed by it (for example a flat file), or they may be external to the transaction manager, managed by an External resource manager with which the transaction manager communicates (for example, a relational database subsystem).
Transaction managers typically use the two phase commit protocol to coordinate the committing or backing out of recoverable resources that have been updated by a transaction. With the exception of when optimizations, such as single-updater or last-agent can be employed, this involves invoking each resource manager twice.
Resources updated by an application program sometimes have an affinity to the processing thread, meaning the transaction manager's two phase commit invocations to the resource manager must be made on the same processing thread as used for the application's update of the resource.
In addition, for transaction managers that operate with external resource managers, this may necessitate using a different processing thread for the resource manager update than is used for running the user's application program. In such an environment, the two phase commit protocol requires switching from an application thread to a resource manager thread and back again for each invocation of the two phase commit protocol. Conversely transaction managers operating with local resource managers may be able to update local resources under the same processing thread that is running the application code.
Switching processing threads is a performance overhead. In the worst case, if an application has updated n resources, this can result in n*4 thread switches at commit time when implementing the two phase commit protocol.
It is desirable to address these shortcomings of known transaction processing systems wherein the conflicting needs for transactional control of multi-threaded processes and for affinity management of the work requests cannot be reconciled other than partially, and by means of expensive and potentially error-prone application and system redesign.